package chp13.home;

public class Home3b {

    public static void main(String[] args) {
        String content = "我爱我的祖国，我爱我的家乡我";
        String item = "我的";
//        System.out.println(content.indexOf(item,5));
        int index = 0;
        while (true){
            index = content.indexOf(item,index);
            System.out.println(index);
            if(index == -1){
                break;
            }
            index++;
        }
    }
}
